﻿@model Webcar.Entitys.BS_CAR_DISCARD
@using (Ajax.BeginForm("DiscardSave", "Car",
    new AjaxOptions
    {
        HttpMethod = "POST",
        //OnBegin = "function(){ loadingPanel.Show(); }",
        //OnComplete = "function(){ loadingPanel.Hide(); }",
        UpdateTargetId = "error-content",
        InsertionMode = InsertionMode.Replace
    }))
{
    @Html.AntiForgeryToken()
    <div id="edit-car">
        @Html.HiddenFor(a => a.DEPT_CODE)
        @Html.HiddenFor(a => a.CAR_NO)
        <table class="edit-table">
            <tr>
                <td style="width: 80px; text-align: right">牌照号：</td>
                <td style="width: 200px">@ViewBag.CarRecord</td>
            </tr>
            <tr>
                <td style="width: 80px; text-align: right;">所属单位：</td>
                <td>@ViewBag.DeptName</td>
            </tr>
            <tr>
                <td style="width: 80px; text-align: right;">报废人：</td>
                <td>@Model.OPERATOR</td>
            </tr>
            <tr>
                <td style="width: 80px; text-align: right;">*报废日期：</td>
                <td>@Html.CalendarFor(a => a.DISCARD_DATE)</td>
            </tr>
            <tr>
                <td style="width: 80px; text-align: right;">*选择操作：</td>
                <td>
                    <select id="discard_type" name="discard_type">
                        <option value="normal" selected="selected">正常</option>
                        <option value="discard">报废</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td style="width: 80px; text-align: right;">报废原因：</td>
                <td>@Html.TextAreaFor(a => a.CAUSE,4,0, new { @style = "width: 100%;" })</td>
            </tr>
        </table>


        <br />
        @Html.ErrorLabel("error-content")

    </div>
    <div class="edit-button">
        @Html.DevExpress().Button(settings =>
        {
            settings.Name = "btnDiscardSave";
            settings.Text = "保存";
            settings.UseSubmitBehavior = true;
            settings.Width = 70;
            settings.ControlStyle.CssClass = "button1";
        }).GetHtml()
        @Html.DevExpress().Button(settings =>
        {
            settings.ControlStyle.CssClass = "button2";
            settings.Name = "btnDiscardCancel";
            settings.Text = "取消";
            settings.Width = 70;
            settings.ClientSideEvents.Click = "function(s, e){ pcModalModeDiscard.Hide(); }";

        }).GetHtml()
    </div>
}

